import React, { useState } from 'react'

export default function App() {
  const [lis, setLis] = useState(['a', 'b', 'c'])
  return (
    <div>
      App
      <button
        onClick={() => {
          const newLis = [...lis]
          newLis.push('d')
          setLis(newLis)
        }}
      >
        插入数据
      </button>
      <hr />
      <ul>
        {lis.map((item, index) => {
          return (
            <li key={item}>
              <span>{item}</span>
              <input type="text" />
            </li>
          )
        })}
      </ul>
    </div>
  )
}
